package com.hong;

import org.zeromq.ZMQ;

/**
 * @author: csh
 * @Date: 2021/4/27 15:16
 * @Description:push-服务端
 */
public class PushServer {
    public static void main(String[] args) {
        ZMQ.Context context = ZMQ.context(1);
        ZMQ.Socket push = context.socket(ZMQ.PUSH);
        push.bind("ipc://hong");
        for (int i = 0; i < 10000000; i++) {
            push.send("hong".getBytes(), i);
        }
        push.close();
        context.term();
    }
}
